/*************************************************************************
	> File Name: P1348.cpp
	> Author: yufangze
	> Mail: 2224590123@qq.com
	> Created Time: 2025-02-13 11:29:08
 ************************************************************************/

#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
    int a, b, cnt = 0;
    cin >> a >> b;
    for (int i = a; i <= b; i++) {
        if (i % 2 != 0 || i % 4 == 0) {
            cnt += 1;
        }
    }
    cout << cnt << endl;
    return 0;
}
